package Homework;

public class Test {
    public static void main(String[] args) {

        Student stu1 = new Student(1, "张三", "男", 22, 90);
        Student stu2 = new Student(2, "李四", "女", 22, 89);
        Student stu3 = new Student(3, "王五", "男", 20, 92);
        Student stu4 = new Student(4, "陈六", "男", 23, 71);
        Student stu5 = new Student(5, "胡七", "女", 24, 94);
        Student [] stus = new Student[5];
        stus[0] = stu1;
        stus[1] = stu2;
        stus[2] = stu3;
        stus[3] = stu4;
        stus[4] = stu5;
        System.out.println("****学员成绩信息*****");
        for(int i = 0; i<stus.length;i++){
            System.out.println(stus[i].getsNo()+"\t"
                    +stus[i].getsName()
                    +"\t"+stus[i].getsSex()
                    +"\t"+stus[i].getsAge()
                    +"\t"+stus[i].getsJava());
        }

        int sum = 0;
        for(int i = 0; i<stus.length;i++){
            sum += stus[i].getsJava();
        }
        System.out.println("平均成绩："+(sum/5));

    }
}

